import Vue from 'vue'
import Router from 'vue-router'
import MainSite from  '../pages/mainSite/mainSite'
import Search from  '../pages/Search/Search'
import profile from  '../pages/profile/profile'
import Order from  '../pages/Order/Order'
import Login from '../pages/Login/Login'
import Shop from '../pages/Shop/Shop'
import ShopGoods from '../pages/Shop/ShopGoods/ShopGoods'
import ShopInfo from '../pages/Shop/ShopInfo/ShopInfo'
import ShopRatings from '../pages/Shop/ShopRatings/ShopRatings'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/mainsite',
      component:MainSite,
      meta:{
        showFooter:true
      }
    },
    {
      path:'/search',
      component:Search,
      meta:{
        showFooter:true
      }
    },
    {
      path:'/profile',
      component:profile,
      meta:{
        showFooter:true
      }
    },
    {
      path:'/order',
      component:Order,
      meta:{
        showFooter:true
      }
    },
    {
      path:'/login',
      component:Login
    },
    {
      path: '/',
     // name: 'HelloWorld',
      redirect:'/mainsite'
    },
    {
      path:'/shop',
      component:Shop,
      children:[
    {
      path:'/shop/goods',
      component:ShopGoods
    },
    {
      path:'/shop/info',
      component:ShopInfo
    },
    {
      path:'/shop/ratings',
      component:ShopRatings
    },
    {
      path:'',
      redirect: '/shop/goods'
        }
      ]
    }
  ]
})
